import 'package:animal/constant/color.dart';
import 'package:animal/constant/font.dart';
import 'package:animal/ui/goods/Controller/norms_dialog_controller.dart';
import 'package:animal/utils/screen_util.dart';
import 'package:animal/widgets/HeaderWidget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:getwidget/getwidget.dart';

///规格选择弹窗
class NormsDialog extends StatelessWidget {
  NormsDialog({Key? key}) : super(key: key);
  final NormsDialogController controller = Get.put(NormsDialogController());

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.vertical(top: Radius.circular(ScreenUtil().L(15)))),
      padding: EdgeInsets.fromLTRB(ScreenUtil().L(25), ScreenUtil().L(15), ScreenUtil().L(15), 0),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Stack(
            children: [
              Row(
                mainAxisAlignment: MainAxisAlignment.end,
                children: [
                  GFIconButton(
                    padding: const EdgeInsets.all(0),
                    icon: Image.asset(
                      "images/close.png",
                      width: ScreenUtil().L(40),
                    ),
                    onPressed: () => SmartDialog.dismiss(),
                    type: GFButtonType.transparent,
                  ),
                ],
              ),
              Container(
                margin: EdgeInsets.only(top: ScreenUtil().L(5)),
                height: ScreenUtil().L(80),
                child: Row(
                  children: [
                    Header.defaultHead(width: 80, height: 80, radius: 15),
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                      children: [
                        Text(
                          "￥59.9",
                          style: KFontConstant.myTextStyle(size: 18, color: KColorConstant.redFF5B5D),
                        ),
                        Text(
                          "剩余22件",
                          style: KFontConstant.myTextStyle(size: 12, color: KColorConstant.grayA9A9A9),
                        ),
                        Text(
                          "已选荷叶猫窝  M",
                          style: KFontConstant.myTextStyle(size: 12, color: KColorConstant.grayA9A9A9),
                        ),
                      ],
                    )
                  ],
                ),
              ),
            ],
          ),
          Container(margin:EdgeInsets.symmetric(vertical: ScreenUtil().L(20)),child: Text("规格", style: KFontConstant.myTextStyle(size: 15)))
        ],

      ),
    );
  }
}
